package cn.sdjzu.exercise;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;

public class CommandActivity extends BasedActivity {
	TextView com;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		ExerciseApp.getInstance().addActivity(this);
		setContentView(R.layout.command);
		com = (TextView) findViewById(R.id.commandView);
		com.setMovementMethod(ScrollingMovementMethod.getInstance());
		command();
	}

	@SuppressWarnings("static-access")
	public void command() {
		TXT.OpenTxtFile();
		TXT.readTxtFile();
		String comm=TXT.readStr;
		com.setText(comm);
	}

	@Override
	public void onBackPressed() {
		Intent intent = new Intent(this, ControlPanelActivity.class);
		startActivity(intent);
		this.finish();
	}

}
